import { defineView } from "@/routers/tools.mjs";

/**
 * @type {DefineView}
 */
const IntercomponentCommunicationView = defineView({
  controller: class {
    static $inject = ["$scope"];

    /**
     * @param {ng.IScope} $scope
     */
    constructor($scope) {
      this.$scope = $scope;
    }

    handleClick() {
      console.log("", this);
    }
  },
  controllerAs: "$view_ctrl",
  template: /* HTML */ html`
    <my-tabs>
      <my-pane title="Hello">
        <h4>Hello</h4>
        <p>Lorem ipsum dolor sit amet</p>
      </my-pane>
      <my-pane title="World">
        <h4>World</h4>
        <em>Mauris elementum elementum enim at suscipit.</em>
        <!-- 这里的  -->
        <p><a href="" ng-click="i = i + 1">counter: {{i || 0}}</a></p>
      </my-pane>
    </my-tabs>
    ${DebugButtonHTML("$view_ctrl")}
  `,
});

export default IntercomponentCommunicationView;
